#ifndef __IANGELS_MODEL_ROOT_H__
#define __IANGELS_MODEL_ROOT_H__

#include <string>
#include <vector>

#include "config.h"
#include "status.h"

namespace iangels {

class ModelRoot {
public:
    ModelRoot(const std::string& model_root): model_root_(model_root) {}
    ~ModelRoot() {}

    Ret Init();

    const std::string& get_model_root() const { return model_root_; }

    inline const Config& config() const { return config_; }
    inline const Config& processor_config() const { return processor_config_; }
    inline const Config& special_tokens_map() const { return special_tokens_map_; }
    inline const Config& tokenizer_config() const { return tokenizer_config_; }
    inline const Config& tokenizer() const { return tokenizer_; }

    Ret FindAllSafeTensorFiles();

    inline const std::vector<std::string>& safetensor_files() const { return safetensor_files_; }

private:

    std::string model_root_;

    Config config_;
    Config processor_config_;
    Config special_tokens_map_;
    Config tokenizer_config_;
    Config tokenizer_;

    std::vector<std::string> safetensor_files_{};
}; // class ModelRoot

} // namespace iangels

#endif // __IANGELS_MODEL_ROOT_H__